package jetpack.com.pzl.architecture.data_binding;

import android.graphics.Color;
import android.widget.TextView;

import androidx.databinding.BindingAdapter;

public class BindingAdapterUtils {

    @BindingAdapter("customChangeTextHandler")
    public static void loadText(TextView textView, BeanTextView beanTextView) {
        textView.setText(beanTextView.text);
        textView.setTextColor(Color.parseColor(beanTextView.txtColor));
        textView.setBackgroundColor(Color.parseColor(beanTextView.bgColor));
        textView.setTextSize(beanTextView.txtSize);
        textView.setPadding(beanTextView.padding, beanTextView.padding, beanTextView.padding, beanTextView.padding);
    }

}
